<div class="wrapper-md" ng-controller="goodsType">
    <toaster-container toaster-options="{'position-class': 'toast-top-center', 'close-button':true}"></toaster-container>
    <div ng-if="warehouseList" class="panel panel-default">
        <div class="panel-heading">
            {{title.title}}
            <!--<button style="float: right;margin-top: -5px;margin-left: 15px;" class="btn m-b-xs btn-sm btn-info btn-addon">-->
            <!--<i class="fa fa-trash-o"></i>删除-->
            <!--</button>-->
            <button ng-click="warehouseJump()"  style="float: right;margin-top: -5px;" class="btn m-b-xs btn-sm btn-primary btn-addon">
                <i class="fa fa-plus"></i>新建
            </button>
        </div>
        <div class="hbox hbox-auto-xs hbox-auto-sm">
            <div class="col" style="width:20%">
                <div class="wrapper-md">
                    <div class="b-a bg-light dk r r-2x">
                        <span ng-if="doing_async">...loading...</span>
                        <div style="width:100%;height:462px;overflow-y:scroll;overflow-x:auto;" class="zTreeDemoBackground left">
                            <ul id="mytree" class="ztree"></ul>
                        </div>
                    </div>
                </div>
            </div>
            <div class="panel-body b-b b-light">
                搜索: <input id="filter" type="text" class="form-control input-sm w-sm inline m-r"/>
            </div>
            <div>
                <table class="table m-b-none" ui-jq="footable" data-filter="#filter" data-page-size="10">
                    <thead>
                    <tr>
                        <th>{{columns[0].title}}</th>
                        <th>{{columns[1].title}}</th>
                        <th>{{columns[2].title}}</th>
                        <th>{{columns[3].title}}</th>
                    </tr>
                    </thead>
                    <tbody>
                    <tr ng-repeat="tb in saveDate">
                        <td><a href ng-click="showInfo(tb)"><u>{{tb.goodtypeNumber}}</u></a></td>
                        <td>{{tb.goodtypeMc}}</td>
                        <td>{{tb.createTime}}</td>
                        <td data-value="1"><span class="{{tb.status1}}" title="Active">{{tb.status}}</span></td>
                    </tr>
                    </tbody>
                    <tfoot class="hide-if-no-paging">
                    <tr>
                        <td colspan="5" class="text-center">
                            <ul class="pagination"></ul>
                        </td>
                    </tr>
                    </tfoot>
                </table>


            </div>
        </div>
    </div>
    <div ng-if="warehouseAdd" class="panel panel-default">
        <div class="panel-heading">
            <u style="cursor:pointer"  ng-click="warehouseJump()">{{title.title}}</u> / {{title.addTitle}}
            <button ng-click="saveGoodsType('sm')" style="float: right;margin-top: -5px;margin-left: 5px;" class="btn m-b-xs btn-sm btn-primary btn-addon">
                <i class="fa fa-plus"></i>保存
            </button>
            <button ng-click="warehouseJump()" style="float: right;margin-top: -5px;margin-left: 5px;" class="btn m-b-xs btn-sm btn-default btn-addon">
                <i class="fa fa-hand-o-left"></i>返回
            </button>
        </div>
        <div class="panel-body">
            <h3 style="text-align: center"><b>货品类别信息</b></h3>
            <form class="form-horizontal" method="get">
                <div class="line line-dashed b-b line-lg pull-in"></div>
                <div class="form-group">
                    <label class="col-sm-2 control-label" for="input-id-1"><span style="color:red">*</span>制&nbsp;&nbsp;单&nbsp;&nbsp;人</label>
                    <div class="col-sm-4">
                        <input readonly type="text" class="form-control" id="zdr" value="{{goodsTypeRow.zdr}}">
                    </div>
                    <label class="col-sm-2 control-label" for="input-id-1"><span style="color:red">*</span>制单日期</label>
                    <div class="col-sm-4">
                        <input readonly type="text" class="form-control" id="createTime" value="{{goodsTypeRow.createTime}}" ng-required="true"/>
                    </div>
                </div>
                <div class="line line-dashed b-b line-lg pull-in"></div>
                <div class="form-group">
                    <label class="col-sm-2 control-label" for="input-id-1"><span style="color:red">*</span>类别名称</label>
                    <div class="col-sm-4">
                        <input type="text" class="form-control" id="goodtypeMc" value="{{goodsTypeRow.goodtypeMc}}">
                    </div>
                    <label class="col-sm-2 control-label" for="input-id-2">类别编码</label>
                    <div class="col-sm-4">
                        <input readonly type="text" class="form-control" id="goodtypeNumber" value="{{goodsTypeRow.goodtypeNumber}}">
                    </div>
                </div>
                <div class="line line-dashed b-b line-lg pull-in"></div>
                <div class="form-group">
                    <label class="col-sm-2 control-label" for="input-id-1">上级类别</label>
                    <div class="col-sm-4">
                        <input readonly style="width:84%;float: left" type="text" class="form-control" id="topName" value="{{goodsTypeRow.topName}}">
                        <input readonly style="display: none" type="text" class="form-control" id="topId" value="{{goodsTypeRow.topId}}">
                        <span class="input-group-btn">
                            <button ng-click="showSelectGoodsType('topName','topId')" class="btn btn-default" type="button"><i class="fa fa-plus"></i></button>
                        </span>
                    </div>
                </div>
                <div class="line line-dashed b-b line-lg pull-in"></div>
                <div class="form-group">
                    <label class="col-sm-2 control-label" for="input-id-1">备&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注</label>
                    <div class="col-sm-10">
                        <textarea type="text" class="form-control" id="goodtypeBz" value="{{goodsTypeRow.goodtypeBz}}">{{goodsTypeRow.goodtypeBz}}</textarea>
                    </div>
                </div>
                <div class="line line-dashed b-b line-lg pull-in"></div>
                <div class="form-group">
                    <label class="col-sm-2 control-label" for="input-id-1">是否启用</label>
                    <label class="i-switch m-t-xs m-r">
                        <input ng-checked="{{goodsTypeRow.qy}}" type="checkbox" id="qy">
                        <i></i>
                    </label>
                </div>
                <div class="line line-dashed b-b line-lg pull-in"></div>
            </form>

        </div>
    </div>
</div>
<script type="text/ng-template" id="myModalContent.html">
    <div ng-include="'tpl/modal.html'"></div>
</script>
<script type="text/ng-template" id="selectGoods.html">
    <div ng-include="'tpl/selectGoods.html'"></div>
</script>